function getFileList($DirectoryPath)
{
   $fileName=(Get-ChildItem -path $DirectoryPath).Name
   return $fileName
}


# directoryPath should be a string  
# getFileList(C:\hr\images)

getFileList("C:\hr\images")